//
//  Red_TableViewCell.m
//  HappyRent
//
//  Created by CoderYee on 2017/4/6.
//  Copyright © 2017年 内圈科技. All rights reserved.
//

#import "Coupon_TableViewCell.h"

@implementation Coupon_TableViewCell

-(void)addOwnView{
    
    [super addOwnView];
    _button=[UIButton buttonWithType:UIButtonTypeCustom];
    [_button setTitle:@"领取" forState:UIControlStateNormal];
    _button.titleLabel.font=systemfont(13);
    _button.layer.cornerRadius=5.0f;
    _button.layer.masksToBounds=YES;
    _button.layer.borderWidth=0.3f;
    [_button setTitleColor:kNavBarThemeColor forState:UIControlStateNormal];
    _button.layer.borderColor=kNavBarThemeColor.CGColor;
    [self.contentView addSubview:_button];
    
    [_button mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(self.contentView);
        make.right.equalTo(self.contentView).with.offset(-10);
        make.height.mas_equalTo(27);
        make.width.mas_equalTo(45);
    }];
    
    _titleLable=[[UILabel alloc] init];
    _titleLable.textColor=kBlackColor;
    _titleLable.font=systemfont(12);
    _titleLable.text=@"订单满2500元使用(不含邮费)";
    [self.contentView addSubview:_titleLable];
    [_titleLable mas_makeConstraints:^(MASConstraintMaker *make)
     {
         make.left.equalTo(self.contentView).with.offset(15);
         make.height.mas_equalTo(21);
         make.centerY.equalTo(self.contentView);
     }];
    
    _priceLable=[[UILabel alloc] init];
    _priceLable.textColor=kNavBarThemeColor;
    _priceLable.font=systemfont(16);
    _priceLable.text=@"￥80";
    [self.contentView addSubview:_priceLable];
    [_priceLable mas_makeConstraints:^(MASConstraintMaker *make)
     {   make.left.equalTo(self.contentView).with.offset(15);
         make.height.mas_equalTo(21);
         make.bottom.equalTo(_titleLable.mas_top).offset(5);
     }];
    
    _dateLable=[[UILabel alloc] init];
    _dateLable.textColor=kGrayColor;
    _dateLable.font=systemfont(11);
    _dateLable.text=@"2017-05-30";
    [self.contentView addSubview:_dateLable];
    [_dateLable mas_makeConstraints:^(MASConstraintMaker *make)
     {   make.left.equalTo(self.contentView).with.offset(15);
         make.height.mas_equalTo(21);
         make.top.equalTo(_titleLable.mas_bottom).with.offset(-5);
     }];
}

@end
